home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 March / macformat-022.iso / Shareware City / Developers / src / out-of-phase-102-c / OutOfPhase 1.02 Source / OutOfPhase Folder / FrameObject.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-23  |  2.6 KB  |  80 lines  |  [TEXT/KAHL]

  1. /* FrameObject.h */
  2.  
  3. #ifndef Included_FrameObject_h
  4. #define Included_FrameObject_h
  5.  
  6. /* FrameObject module depends on */
  7. /* MiscInfo.h */
  8. /* Audit */
  9. /* Debug */
  10. /* Definitions */
  11. /* NoteObject */
  12. /* Memory */
  13. /* DataMunging */
  14. /* Screen */
  15. /* NoteImages */
  16. /* Frequency */
  17. /* StaffCalibration */
  18. /* Fractions */
  19.  
  20. #include "Screen.h"
  21.  
  22. /* this is the width of the note part of an icon */
  23. #define ICONWIDTH (20)
  24.  
  25. /* this is how much space to put between notes in the same frame */
  26. #define INTERNALSEPARATION (12)
  27.  
  28. /* how much from the top of the note to the staff line intersection point */
  29. #define TOPNOTESTAFFINTERSECT (23)
  30.  
  31. /* how much from the starting edge of the note icon does the note really start */
  32. #define LEFTNOTEEDGEINSET (6)
  33.  
  34. struct FrameObjectRec;
  35. typedef struct FrameObjectRec FrameObjectRec;
  36.  
  37. /* forward declarations */
  38. struct FractionRec;
  39.  
  40. /* allocate a new frame. */
  41. FrameObjectRec*                NewFrame(void);
  42.  
  43. /* dispose of a frame and all notes it contains.  be careful here since this won't */
  44. /* worry about tie references to notes contained in the frame. */
  45. void                                    DisposeFrameAndContents(FrameObjectRec* Frame);
  46.  
  47. /* get the number of notes contained in the frame */
  48. long                                    NumNotesInFrame(FrameObjectRec* Frame);
  49.  
  50. /* get the note specified by the index from the frame object */
  51. struct NoteObjectRec*    GetNoteFromFrame(FrameObjectRec* Frame, long Index);
  52.  
  53. /* delete a note in the frame.  returns True if successful. */
  54. MyBoolean                            DeleteNoteFromFrame(FrameObjectRec* Frame, long Index);
  55.  
  56. /* append a note to the frame.  returns True if successful. */
  57. MyBoolean                            AppendNoteToFrame(FrameObjectRec* Frame, struct NoteObjectRec* Note);
  58.  
  59. /* find out if this is a command frame.  command frames are allowed to have a */
  60. /* single command and nothing else in them */
  61. MyBoolean                            IsThisACommandFrame(FrameObjectRec* Frame);
  62.  
  63. /* find out the width of this command/note frame and draw it if the flag is set. */
  64. /* it assumes the clipping rectangle is set up properly.  the X and Y parameters */
  65. /* specify the left edge of the note and the Middle C line. */
  66. /* this routine does not handle drawing of ties. */
  67. OrdType                                WidthOfFrameAndDraw(WinType* Window, OrdType X, OrdType Y,
  68.                                                 FontType Font, FontSizeType FontSize, OrdType FontHeight,
  69.                                                 FrameObjectRec* Frame, MyBoolean ActuallyDraw,
  70.                                                 MyBoolean GreyedOut);
  71.  
  72. /* find out the duration of the specified frame.  returns the duration of the */
  73. /* frame as a fraction */
  74. void                                    DurationOfFrame(FrameObjectRec* Frame, struct FractionRec* Frac);
  75.  
  76. /* make a total (deep) copy of the frame and the notes it contains */
  77. FrameObjectRec*                DeepDuplicateFrame(FrameObjectRec* Frame);
  78.  
  79. #endif
  80.